<?php
namespace app\index\controller;
use think\Controller;
use app\index\controller\Rest;

class Unlogin extends Controller
{


    /**
     * 调用短信验证接口Rest
     * @param $to
     * @param $datas
     * @param $tempId
     * @return \SimpleXMLElement[]
     */
    public function sendTemplateSMS($to, $datas, $tempId)
    {
        // 初始化REST SDK
        $rest = new REST(SERVERIP, SERVERPORT,SOFTVERSION);
        $rest->setAccount( ACCOUNTSID,ACCOUNTTOKEN);
        $rest->setAppId(APPID);
        $result = $rest->sendTemplateSMS($to, $datas, $tempId);
        return $result->statusCode;
    }


}
